﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using TTBusiness.ClassDB;
using TTBusiness.DB_Linq;
using Telerik.Web.UI;
namespace TTMarketing.CameraUserControl.SanPham
{
    public partial class ucDetailTab : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                clsBSProductDetail objDB = new clsBSProductDetail();
                List<tblProduct_Detail> objL = new List<tblProduct_Detail>();
                objL = objDB.getByProduct(Convert.ToInt32(Request.QueryString["id"]));
                foreach (var item in objL)
                {
                    RadTab tab = new RadTab();
                    this.RadTabStrip1.Tabs.Add(tab);
                    tab.Text = item.tblCate_Detail.tblDetail.Name;
                    tab.Value = item.Detail;
                    RadPageView pv = new RadPageView();
                    this.RadMultiPage1.PageViews.Add(pv);
                    Label l = new Label();
                    l.Text = item.Detail;
                    pv.Controls.Add(l);
                    if (item.tblCate_Detail.Number.Equals(1))
                    {
                        tab.Selected = true;
                        pv.Selected = true;
                    }
                    //pv.
                    //tab.m
                }
            }
            catch (Exception)
            {
                
                throw;
            }
        }
    }
}